package com.tricode.ile.training.task.one.helpers;

import java.util.ArrayList;

public class PrintArray {

	/**
	 * this class prints the list of integers in console
	 * 
	 * @param list is the list of integers you want to print
	 */
	public void printArrayOfIntegers(ArrayList<Integer> list) {
		System.out.print("[");
		for (int i = 0; i < list.size() - 1; i++) {
			System.out.print(list.get(i)+", ");
		}
		System.out.print(list.get(list.size() - 1) +"]\n");
	}
	
	public void printArrayOfIntegers(int[] list) {
		System.out.print("[");
		for (int i = 0; i < list.length - 1; i++) {
			System.out.print(list[i]+", ");
		}
		System.out.print(list[list.length - 1] +"]\n");
	}

}
